#!/bin/sh
set -e

cd `dirname $0`

if [ $# -eq 1 ]; then
    whichday="$1"
else
    whichday='-1 day'
fi

day=`date +%Y%m%d --date "$whichday"`

./hbase_get_fourthinfo_raw_data.sh $day
./load_fourthinfo_to_mysql.py $day
rm data/${day}.txt
